from flask import Flask,request
from flask import render_template

app = Flask(__name__)

@app.route('/')
def hello_world():  # put application's code here
    return render_template('hello.html')

@app.route('/log')
def log():
    return '这是日志页'

@app.route('/index',methods=['GET','POST'])
def index():
    return render_template('index.html')

@app.route('/result',methods=['POST'])
def result():
    first_name = request.form['firstname']
    last_name = request.form['lastname']
    full_name = first_name.title() + ' ' + last_name.title()

    return render_template('result.html', fullname = full_name)



if __name__ == '__main__':
    app.run()


